package top.zy.service.zymallgoodsservice.brand.dao;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import top.zy.service.zymallgoodsinterface.entity.Brand;

import java.util.List;

@Mapper
public interface BrandMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Brand record);

    int insertSelective(Brand record);

    Brand selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Brand record);

    int updateByPrimaryKey(Brand record);

    List<Brand> selectPageBySearch(@Param("search") String search,@Param("sortBy") String sortBy,@Param("desc") String desc);

    int selectAllCount(@Param("search") String search,@Param("sortBy") String sortBy,@Param("desc") String desc);

    int insertBrandCategory(@Param("id") Long id,@Param("cid") Long cid);

    List<Long> selectBrandIdByCategoryId(@Param("categoryId") Long categoryId);

    List<Brand> queryBrandByIds(@Param("ids") List<Long> ids);

}